package com.training.bt.service;

import com.training.bt.entity.Post;

import java.util.List;

public interface IPostService {
    Post createPost(Post post);
    Post getPostById( Long postId);
    List<Post> getPostsByUserId( Long userId);
    List<Post> getAllPosts();
    Post updatePost(Post post);
    void deletePost( Long postId);
    List<Post> getAllPostsWithCommentCount(); // 添加查询所有帖子及评论数的方法
    Post getPostByIdWithCommentCount(Long postId); // 添加根据帖子ID查询帖子及评论数的方法
    List<Post> getPostsByUserIdWithCommentCount(Long userId);
}